package com.neusoft.neuiotms.dcom.model.alter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_alter_second_line", comment = "二线工程师申请表")
@Table(name = "neuiot_alter_second_line")
public class AlterSecondLine extends AbstractAuditModel {

    private static final long serialVersionUID = 5798295891365819165L;

    /** 工作流TaskId */
    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    /** 工单号 */
    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workNum;

    /** 故障级别 */
    @Length(max = 50, message = "故障级别不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NULL DEFAULT NULL COMMENT '故障级别'")
    private String faultLevel;

    /** 参与工程师 */
    @Length(max = 255, message = "参与工程师不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '参与工程师'")
    private String engineerCode;

    /** 参与工程师 */
    @Length(max = 255, message = "参与工程师名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '参与工程师名称'")
    private String engineerName;

    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '故障解决情况'")
    private String context;

    /** 选择的资产 */
    @Length(max = 1023, message = "选择的资产")
    @Column(length = 1023, nullable = true)
    @Comment("varchar(1023) NULL DEFAULT NULL COMMENT '选择的资产'")
    private String assets;

    /** 操作人编码 */
    @NotBlank(message = "操作人编码不能为空")
    @Length(max = 50, message = "操作人编码不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '操作人编码'")
    private String operatorCode;

    /** 操作人名称 */
    @NotBlank(message = "操作人名称不能为空")
    @Length(max = 50, message = "操作人名称不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NULL DEFAULT NULL COMMENT '操作人名称'")
    private String operatorName;

    /** 是否转派 */
    @Comment("bit(1) NOT NULL COMMENT '是否转派'")
    private Boolean transfer = false;

    /** 转派人 */
    @Length(max = 50, message = "转派人名称不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NULL DEFAULT NULL COMMENT '转派人名称'")
    private String transferUserName;

    /** 转派工程师名称 */
    @Length(max = 50, message = "转派工程师名称不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NULL DEFAULT NULL COMMENT '转派工程师名称'")
    private String transferEngineerName;

    /** 转派工程师编码 */
    @Length(max = 50, message = "转派工程师编码不能超过{max}位")
    @Column(length = 50, nullable = true)
    @Comment("varchar(50) NULL DEFAULT NULL COMMENT '转派工程师编码'")
    private String transferEngineerCode;

    /** 转派原因 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '转派原因'")
    private String transferReason;

}
